package com.ruoyi.web.lambda;

/**
 * @Program: RuoYi-Vue-chy->lambda
 * @Description: lambda表达式
 * @Author: hongyu.chen
 * @Date: 2025-03-07 16:19
 * @Version： 1.0
 **/
public class lambda {

    public static void main(String[] args) {
        Runnable runnable = new Runnable() {
            @Override
            public void run() {
                System.out.println("Hello, World!");
            }
        };
        new Thread(runnable).start();

        Runnable runnableLambda = () -> { System.out.println("Hello, World!");};
        new Thread(runnable).start();

        new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("Hello, World!");
            }
        }).start();

        new Thread(() -> { System.out.println("Hello, World!");}).start();
    }
}
